<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <th:block th:include="include :: header('统计列表')"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight" style="padding: 20px 20px 0;">
    <div class="row">
        <div class="col-sm-3" onclick="updateTerraceMoney()">
            <div class="ibox">
                <div class="ibox-title">
                    <span class="label label-primary pull-right">NEW</span>
                    <h5>平台流动金额</h5>
                </div>
                <div class="ibox-content">
                    <span>总合：</span>
                    <h1 align="center" th:text="${$terrace}"></h1>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-title">
                    <span class="label label-primary pull-right">NEW</span>
                    <h5>商家未提现</h5>
                </div>
                <div class="ibox-content">
                    <span>总合：</span>
                    <h1 align="center" th:text="${$shop}">0</h1>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-title">
                    <span class="label label-primary pull-right">NEW</span>
                    <h5>会员未提现</h5>
                </div>
                <div class="ibox-content">
                    <span>总合：</span>
                    <h1 align="center" th:text="${$user}">0</h1>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-title">
                    <span class="label label-primary pull-right">NEW</span>
                    <h5>未使用积分</h5>
                </div>
                <div class="ibox-content">
                    <span>总合：</span>
                    <h1 align="center" th:text="${grade}">0</h1>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="col-sm-12 select-table table-striped" style="margin-top: 0">
    <table id="bootstrap-table"></table>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">

    var prefix = ctx + "streamTerrace/streamTerrace";

    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            showSearch: false,
            showRefresh: false,
            showColumns: false,
            showToggle: false,
            modalName: "平台收入",
            columns: [
                {
                    field: 'orderNum',
                    title: '订单编号'
                },
                {
                    field: 'gainType',
                    title: '操作记录'
                },
                {
                    field: 'gainMoney',
                    title: '实际变动金额',
                    formatter: function(value, row, index) {
                        return value+"元";
                    }
                },
                {
                    field: 'createTime',
                    title: '创建时间'
                }]
        };
        $.table.init(options);
    });

    
    function updateTerraceMoney() {
        var url = prefix + "/sysEditMoney";
        $.modal.open("修改金额", url, '800', '300');
    }

</script>

</body>
</html>
